#pragma once

#include "pattern.h"

namespace tp1
{
	class Wheel : public Object3D
	{
	public:
		Wheel(float radius,int qPieces,float radiusCylinders,int sidesCylinders);
		virtual ~Wheel(void);

		float GetRadius();

		float GetRotationAngle();

		void SetRadius(float radius);

		void SetDivisions(int divisions);

		void Render();


	private:
		static const int QOBLIQUECYLINDERS = 2;
	
		Pattern* m_pattern;

		int m_qDivisions;

		float m_rotationAngle;
		float m_xrot;
		float m_yrot;
		float m_zrot;
	};

	class WheelComposite : public Object3D
	{
	public:
			WheelComposite(float radius,int qPieces,float radiusCylinders,int sidesCylinders,Object3D* object);
			virtual ~WheelComposite(void);

			void Rotate(float angle,float x, float y, float z);

			void Render();

	private:
		static const int QTIMES_OBJECT_DRAWN = 3 ;
		static const float ANGLE_GAP;

		Wheel*	m_wheel;
		Object3D* m_object;
		Cylinder* m_cylinder;

		float m_angleRotation;
		float m_xrot;
		float m_yrot;
		float m_zrot;

	};

}
